home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet multimedia / Animacje, filmy i prezentacje / Modelowanie 3D / K-3D 0.6.5.0 / k3d-all-in-one-setup-0.6.5.0.exe / k3d-setup-0.6.5.0.exe / share / lsystem / menger-cube.ls < prev    next >
Encoding:
Text File  |  2005-02-12  |  713 b   |  25 lines

  1. # --- L-System Parser/Mutator --- Lj Lapre ----------------------------------
  2. #
  3. # This ls produces menger cubes. Recursion level 0 will produce a
  4. # 0th order cube, 2 a 1th, 4 a 3th, and 6 a 4th. Level 8 will
  5. # produce a 5th order menger with a total off 960.000 polygons !
  6. #
  7. # Change F= ... to F=[~(5)"(.333333)[-f+&f^B]]f add randomness.
  8. #
  9. # One can replace B= ... with a number of alternatives:
  10. #
  11. # B=[fz+zF]^f&[FFF|z|+zFF|z|+zFF|z|+zF]^f&[fz+zF]
  12. # B=[fz+zF]^f&[FFF|z|+zFF|z|+zFF|z|+zF|z|+zF]^f&[fz+zF]
  13. # B=[FFF|z|+zFF|z|+zFF|z|+zF]^f&[FfF|z|+zfF|z|+zfF]^f&[FFF|z|+zFF|z|+zFF|z|+zF]
  14. #
  15. 4
  16. 90
  17. 142.857
  18. #
  19. F
  20. #
  21. F=["(.333333)[-f+&f^B]]f
  22. #
  23. B=[FFF|z|+zFF|z|+zFF|z|+zF]^f&[FfF|z|+zfF|z|+zfF]^f&[FFF|z|+zFF|z|+zFF|z|+zF]
  24. @
  25.